Component({
  data: {
    selected: 0,
    color: "#7A7E83",
    selectedColor: "#3cc51f",
    list: [{
      pagePath: "/pages/index/index",
      iconPath: "/images/homeC.png",
      selectedIconPath: "/images/homeO.png",
      text: "首页"
    }, 
    {
      pagePath: "/pages/market/market",
      iconPath: "/images/business/gouwuche.png",
      selectedIconPath: "/images/business/gouwuchefill.png",
      text: "产品中心"
    }, 
    {
      pagePath: "/pages/home/home",
      iconPath: "/images/userC.png",
      selectedIconPath: "/images/userO.png",
      text: "个人中心"
    }]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      this.setData({
        selected: data.index
      })
    }
  }
})